﻿#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>

//	字符逆序
void exchge(char arr[], int len)
{
	char tmp = '0';
	int left = 0;
	int right = len-1;
	while (left < right) 
	{
		tmp = arr[right];
		arr[right] = arr[left];
		arr[left] = tmp;
		left++;
		right--;
	}
}
int main() 
{
	char arr[] = {"hello world"};
	int len = strlen(arr);

	printf("%s\n", arr);
	exchge(arr, len);
	printf("%s\n", arr);

	return 0;
}